package flextv.main.logic {


import com.adobe.cairngorm.control.FrontController;

import flextv.core.event.PlayItemEvent;
import flextv.display.command.PlayItemCommand;
import flextv.main.command.AddPlaylistCommand;
import flextv.main.command.AddSearchItemCommand;
import flextv.main.command.CheckUpdatesCommand;
import flextv.main.command.DeletePlaylistCommand;
import flextv.main.command.DeleteStoredItemCommand;
import flextv.main.command.ImportCommand;
import flextv.main.command.QuitCommand;
import flextv.main.command.SaveVideoFileCommand;
import flextv.main.command.StoredItemDownloadedCommand;
import flextv.main.command.ToggleStatusbarVisibilityCommand;
import flextv.main.command.ToggleToolbarVisibilityCommand;
import flextv.main.event.AddPlaylistEvent;
import flextv.main.event.CheckUpdatesEvent;
import flextv.main.event.DeletePlaylistEvent;
import flextv.main.event.DeleteStoredItemEvent;
import flextv.main.event.ImportEvent;
import flextv.main.event.QuitEvent;
import flextv.main.event.SaveVideoFileEvent;
import flextv.main.event.StoredItemDownloadedEvent;
import flextv.main.event.ToggleStatusbarVisibilityEvent;
import flextv.main.event.ToggleToolbarVisibilityEvent;
import flextv.search.command.InvokeSearchCommand;
import flextv.search.event.AddSearchItemEvent;
import flextv.search.event.InvokeSearchEvent;


public class Controller extends FrontController {
	
	public function Controller() {
		
		this.addCommand(AddSearchItemEvent.ADD_SEARCH_ITEM, AddSearchItemCommand);
		this.addCommand(DeleteStoredItemEvent.DELETE_ITEM, DeleteStoredItemCommand);
		this.addCommand(StoredItemDownloadedEvent.STORED_ITEM_DOWNLOADED, StoredItemDownloadedCommand);
		
		this.addCommand(AddPlaylistEvent.ADD_PLAYLIST, AddPlaylistCommand);
		this.addCommand(DeletePlaylistEvent.DELETE_PLAYLIST, DeletePlaylistCommand);
		
		this.addCommand(InvokeSearchEvent.INVOKE_SEARCH, InvokeSearchCommand);
		
		this.addCommand(PlayItemEvent.PLAY_ITEM, PlayItemCommand);
		
		this.addCommand(CheckUpdatesEvent.CHECK_FOR_UPDATES, CheckUpdatesCommand);
		this.addCommand(ToggleToolbarVisibilityEvent.TOGGLE_TOOLBAR_VISIBILITY, ToggleToolbarVisibilityCommand);
		this.addCommand(ImportEvent.IMPORT, ImportCommand);
		this.addCommand(SaveVideoFileEvent.SAVE_VIDEO_FILE, SaveVideoFileCommand);
		this.addCommand(ToggleStatusbarVisibilityEvent.TOGGLE_STATUSBAR_VISIBILITY, ToggleStatusbarVisibilityCommand);
		
		this.addCommand(QuitEvent.QUIT, QuitCommand);
	}
	
}
}